home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7059 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: rtsg.mot.com!khosravn
  2. From: khosravn@rtsg.mot.com (Shahram Khosravani)
  3. Newsgroups: comp.windows.x.motif,comp.lang.c++
  4. Subject: Re: MOTIF Callbacks, C++ Member Functions - SOLVED
  5. Date: 21 Feb 1996 15:24:59 GMT
  6. Organization: Motorola Cellular
  7. Distribution: inet
  8. Message-ID: <4gfdgb$n2d@newdelph.cig.mot.com>
  9. References: <4f6oau$c4m@knot.queensu.ca> <4f9fbo$7ju@news1.halcyon.com> <4gbf05$6d8@rex.sfe.com.au> <4gc9p3$s7s@tech.cftnet.com>
  10. NNTP-Posting-Host: ocelot.cig.mot.com
  11.  
  12. In article <4gc9p3$s7s@tech.cftnet.com>, wcowley@cftnet.com (Wes Cowley) writes:
  13. |> Paul Hatchman (paul@sfe.com.au) wrote:
  14. |> : danubius@chinook.halcyon.com () writes:
  15. |> : 
  16. |> : >Wintermute  <3mal5@qlink.queensu.ca> wrote:
  17. |> : >>
  18. |> : >>The solution was to declare a static member function which is used as a 
  19. |> : >>callback.  Since it is static, there is no 'this' pointer, and it works 
  20. |> : >>fine.  To access the particular class instance, pass the 'this' pointer 
  21. |> : >>as client data when installing the callback, and it will be available 
  22. |> : >>when the static member function is called back.
  23.  
  24. I don't do much C++ these days, but I think that the 'this' pointer you
  25. are passing in as client data, can only be used to access other static
  26. data/function members. It can not access any non-static data members or call
  27. any non-static methods. True/False ?
  28.  
  29. --
  30. Shawn Shahram Khosravani, Contractor (i.e. disclaimers implied)
  31.  
  32.